package com.dartfar.mail.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.dartfar.base.model.T_User;


//邮件状态
@Entity
@Table(name = "T_Mail_State")
public class MailState {
	
	private int id;

	private T_User sendUser;

	private T_User receiveUser;

	private Mail mail;

	private Boolean readFlag = true;

	private Date receiveDate = new Date();


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name = "sendUserId")
	public T_User getSendUser() {
		return sendUser;
	}

	public void setSendUser(T_User sendUser) {
		this.sendUser = sendUser;
	}
	@OneToOne
	@JoinColumn(name = "receiveUserId")
	public T_User getReceiveUser() {
		return receiveUser;
	}

	public void setReceiveUser(T_User receiveUser) {
		this.receiveUser = receiveUser;
	}

	@ManyToOne
	@JoinColumn(name = "mailId")
	public Mail getMail() {
		return mail;
	}

	public void setMail(Mail mail) {
		this.mail = mail;
	}

	public Boolean getReadFlag() {
		return readFlag;
	}

	public void setReadFlag(Boolean readFlag) {
		this.readFlag = readFlag;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}
	
	

}
